﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Ccit.OA.NewsCenter
{
    public partial class news_window_attr : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack){
                _hidPlateId.Value = (null != Request.QueryString["plateId"]) ? Request.QueryString["plateId"].ToString() : "";
                _hidBorderColor.Value = "#CDCECF";//默认值
                _hidType.Value = (null != Request.QueryString["Type"]) ? Request.QueryString["Type"].ToString() : "0";
            }
            initializePage();
        }
        private void initializePage()
        {
            if (_hidPlateId.Value != "")//编辑
            {
                //窗口信息
                WindowBLL winbll = new WindowBLL();
                MsWinStyle winObj=winbll.GetWinStyleObj(_hidPlateId.Value,_hidType.Value);
                txtPlateName.Value = winObj.PlateName;
                if (winObj.PlateLogo != "" && winObj.PlateLogo != null)
                {
                     imgLogo.Src = winObj.PlateLogo;
                     imgLogo.Visible = true;
                     imgLogo.Attributes.Add("style","diaplay:block");
                     _hidImgPath.Value = winObj.PlateLogo;
                }
                
                txtShowNum.Value= winObj.ShowNum;
                if (winObj.ShowPubTime == "1")
                    cbkShowDate.Checked = true;

                if (winObj.ShowCreateor == "1")
                    cbkShowCreateor.Checked = true;
                //调色板颜色
                if (winObj.TitleStyle != "")
                {
                    _hidBorderColor.Value = "#" + winObj.TitleStyle;
                }
            }
        }
    }
}
